﻿using System;
using System.Collections.Generic;
using System.Text;
using RapidSpider.Enumerators;
using System.Collections;
using System.IO;

namespace RapidSpider.DownloadAgents
{
    public interface IDownloadAgent
    {
        #region Properties
        DownloadAgentStatus Status
        {
            get;
            set;
        }

        string StatusMessage
        {
            get;
        }

        long DownloadedAmount
        {
            get;
        }

        int DownloadedPercentage
        {
            get;
        }

        decimal DownloadSpeed
        {
            get;
        }

        decimal RemainingAmount
        {
            get;
        }

        Uri SourceUri
        {
            get;
        }

        string SourceServer
        {
            get;
        }

        decimal SourceFileSize
        {
            get;
        }

        FileInfo IncompleteTargetFileInfo
        {
            get;
        }

        long TargetFileSize
        {
            get;
        }
        #endregion

        #region Methods
        void Initialise();
        void Start();
        #endregion
        
        #region Events
        event EventHandler Initialising;
        event EventHandler Initialised;
        event EventHandler Starting;
        event EventHandler Downloading;
        event EventHandler Paused;
        event EventHandler Completed;
        event EventHandler Cancelled;
        event EventHandler Failed;
        event EventHandler StatusChanged;
        #endregion
    }
}
